using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

/// <summary>
/// 查询节点
/// </summary>
public abstract class InquireNode : TutorialNode
{
    [JsonClassAttribute]
    public class RetNode {
        [JsonAttribute("testsss","测试节点")]
        public BuildingInquireNode.buildingState test2 = BuildingInquireNode.buildingState.ExistNotHarvest;

        [JsonAttribute("testsssfff", "忽略列表")]
        public List<string> skipList = new List<string>();


#if UNITY_EDITOR
#pragma warning disable 0414
        [JsonEditorparametersAttribute("HideEnds")]
        [JsonEditorAttribute(typeof(SwitchTagsJsonSpecialMember), "testsssfff")]
        public List<int> _switchTagsIndex = new List<int>();
#pragma warning restore
#endif

    }

    public Type enumType
    {
        get
        {
            return GetShowEnumType();
        }
    }
#if UNITY_EDITOR
    [Json("desc")]
    public string test2 = "";

    [JsonEditor(typeof(InquireSpecialMember), "desc")]
    public string test
    {
        get
        {
            return GetShowDesc();
        }
        set
        {

        }
    }
#endif

    [JsonAttribute("handleList", "处理列表")]
    public List<RetNode> handleList = new List<RetNode>() { new RetNode()};

    public abstract string GetShowDesc();
    public abstract Type GetShowEnumType();
    protected override void Cancel()
    {
    }

    protected override void Init()
    {
    }
}

public class BuildingInquireNode : InquireNode
{
    public enum buildingState
    {
        None,
        ExistNotHarvest,
        Harvest,
    }
    public override string GetShowDesc()
    {
        return @"None：表示这个建筑没有/n
                 ExistNotHarvest：表示这个建筑已经建筑但是没有收取/n
                 Harvest：表示这个建筑已经收取了/n";
    }

    public override Type GetShowEnumType()
    {
        return typeof(buildingState);
    }
}
